﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LeMigue.Scrum.Iterface.Model;

namespace LeMigue.TeamPortal.Dev.Cenarios
{
    public class DevCenario01 : IDevCenario
    {
        public IList<Team> Team { get { return DevDados.Team; } }

        public IDictionary<Team, IList<User>> User {
            get
            {
                IDictionary<Team, IList<User>> _users = new Dictionary<Team, IList<User>>();

                _users.Add(DevDados.Team[0], DevDados.Users);

                return _users;
            }
        }

        public IDictionary<Team, IList<Project>> Projects
        {
            get
            {
                IDictionary<Team, IList<Project>> _projetos = new Dictionary<Team, IList<Project>>();

                _projetos.Add(DevDados.Team[0], DevDados.Projects);

                return _projetos;
            }
        }

        public IDictionary<Team, IList<Iteration>> Iteraction
        {
            get
            {
                IDictionary<Team, IList<Iteration>> _iterations = new Dictionary<Team, IList<Iteration>>();

                DevDados.Iteration[0].Sprint = DevDados.Sprint[0];
                DevDados.Sprint[0].Iteration = DevDados.Iteration[0];

                //DevDados.Iteration[0].Sprint.SetTasks(new System.Lazy<IList<Task>>(() => DevDados.Tasks.Take(2)));


                DevDados.Iteration[1].Sprint = DevDados.Sprint[1];
                DevDados.Sprint[1].Iteration = DevDados.Iteration[1];

                _iterations.Add(DevDados.Team[0], DevDados.Iteration);

                return _iterations;
            }
        }
    }
}
